// 用户接口

import global from "@/utils/global.params.js";
import axios from "@/axios/config/axios.js";

const user = {
    // 注册接口
    regist(param) {
        return new Promise((resolve, reject) => {
            axios.post("/user/regist", { data: param }).then(res => {
                resolve(res)
            }).catch(err => {
                reject(err)
            })
        })
    },
    // 登陆接口
    login(param) {
        return new Promise((resolve, reject) => {
            axios.post("/user/login", { data: param }).then(res => {
                resolve(res)
            }).catch(err => {
                reject(err)
            })
        })
    },
    // 忘记密码接口
    forget(param) {
        return new Promise((resolve, reject) => {
            axios.post("/user/forget", { data: param }).then(res => {
                resolve(res)
            }).catch(err => {
                reject(err)
            })
        })
    },
}

export default user